<?php
namespace Api\Controller;

class MeizituController extends BaseRestController {

    public function page() {
        $pageNum = I('pageNum', 1, 'int');
        $pageNum = $pageNum <= 1 ? 0 : $pageNum - 1;
        $perPage = 25;

        $tu = M("Tu");
        $list = $tu->field('id, menuId, title, picPath, totalImgCount')->where('menuId=8')->order('id desc')->limit($perPage * $pageNum . ',' . ($pageNum + 1) * $perPage)->select();

        foreach ($list as $key => $v) {
            $list[$key]['picpath'] = 'http://images.meitu.tv/' . $v['picpath'];

            echo $list[$key]['picpath'] . "\n";
        }

        $this->responseDataJson($list);
    }




}